package cn.tedu.spring.eg3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class Shop {
    private String str;

    public Shop() {
        System.out.println("爱");
    }
    @Value("我")
    public void setStr(String str) {
        this.str = str;
    }



    @PostConstruct
    public void init(){
        System.out.println("活着");

    }
    @PreDestroy
    public void kill(){
        System.out.println("死亡");
    }












}
